/**
 * Created By 李柏霖
 * 2024/9/5 10:56
 */

package com.lbl.flowabledemo02.listener;

import lombok.extern.slf4j.Slf4j;
import org.flowable.task.service.delegate.DelegateTask;
import org.flowable.task.service.delegate.TaskListener;

@Slf4j
public class MyListener01 implements TaskListener {
    @Override
    public void notify(DelegateTask delegateTask) {
        log.info("MyListener01...notify...run:{}",delegateTask.getEventName());
        if (EVENTNAME_CREATE.equals(delegateTask.getEventName())) {
            //用户节点的创建，然后指派审批人
            delegateTask.setAssignee("lbl");
        }
    }
}
